const asyncDataApi = (listquery) => {
  console.log("params", listquery);
  // 模拟异步请求接口
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      const data = [];

      for (let i = listquery.page * 100; i < (listquery.page + 1) * 100; i++) {
        const obj = {
          id: i - 99,
          name: "姓名" + i,
          age: 20 + i,
          hobby:
            "赵客缦胡缨，吴钩霜雪明。银鞍照白马，飒沓如流星。十步杀一人，千里不留行。事了拂衣去，深藏身与名。闲过信陵饮，脱剑膝前横。将炙啖朱亥，持觞劝侯嬴。" +
            i,
          sex: "男" + i,
          birthday: "2020-01-01",
          createTime: "1701155392",
          updateTime: "2020-01-01",
          remark: "备注" + i,
          status: "1" + i,
        };

        // let newObj = {};
        // for (var a = 1; a < 500; a++) {
        //   for (let k in obj) {
        //     newObj[k + a] = obj[k];
        //   }
        // }
        // data.push(newObj);
        data.push(obj);
      }

      resolve({
        data,
        code: 200,
        msg: "请求成功",
        paginator: {
          page: 1000,
          size: 100,
          total: 100000,
          currentPage: listquery.page,
        },
      });
    }, 100);
  });
};
export { asyncDataApi };
